<template>
	<view class="bg-white" style="height: 100vh;">
		<cu-custom :bgColor="NavBarColor" :isBack="true" backFlag="navigate">
			<block slot="backText">返回</block>
			<block slot="content">阴保NB详情</block>	
		</cu-custom>
		<view class="cu-list menu margin-top">

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">设备编号:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.deviceId}}</text>
				</view>
			</view>
			
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">通电电位(mV):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.pson}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">断电电位(mV):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.psoff}}</text>
				</view>
			</view>


			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">交流电压(V):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.av}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">自然电位(V):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.sp}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">试片直流电流(mA):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.dc}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">试片交流电流(mA):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.ac}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">牺牲阳极电位(V):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.sap}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">牺牲阳极保护电流(mA):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.sac}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">信号强度(dBm):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.si}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">通讯状态:</text>
				</view>
				<view class="action">
					<text v-if="annotation.ts=='0'" class="text-black title " style="color: #19be6b;">&nbsp;在线</text>
					<text v-if="annotation.ts=='1'" class="text-black title " style="color: #ed4014;">&nbsp;离线</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">电池电压(V):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.bv}}</text>
				</view>
			</view>

			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">电池电量(%):</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.ba}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">供电状态:</text>
				</view>
				<view class="action">
					<text v-if="annotation.pss=='0'" class="text-black title ">&nbsp;正常</text>
					<text v-if="annotation.pss=='1'" class="text-black title ">&nbsp;更换电池</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">厂商信息:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.mf}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">时间戳:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.time}}</text>
				</view>
			</view>
			<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
				<view class="content">
					<text class="text-black title ">创建时间:</text>
				</view>
				<view class="action">
					<text class="text-black title ">{{annotation.createTime}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>


export default {
	data(){
		return{
			NavBarColor:this.NavBarColor,
			annotation:{
				id:"",
				titile:"",
				startTime:"",
				sender:"",
				msgContent:"",
				recordVideo:"",
				workPic:"",
			},
			goodNumber:null,
			flg:true,
			src:"",
			pic:""
			
		}
	},

	onLoad: function (option) {
	    const annItem = JSON.parse(decodeURIComponent(option.item));
		this.annotation = annItem 
		this.src=this.annotation.reportVideo
		this.pic=this.annotation.workPic
		console.log(this.annotation.recordPic)
	},
	created(){
		console.log("created")
	},
	methods:{
	   showVideo() {
				uni.navigateTo({
					url: '/pages/common/commonVideo?item='+this.src
				}) 
	   }, showPic() {
		   console.log(this.pic)
				uni.navigateTo({
					url: '/pages/common/commonPic?item='+this.pic
				}) 
	   }
	}
}
</script>

<style>
	
</style>
